﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User.Master" AutoEventWireup="true" CodeBehind="UpdateEvent.aspx.cs" Inherits="Event_SG_EWDT.UpdateEvent" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Userhead" runat="server">
    <title>Update Event</title>
    <link href="Styles/TabControl.css" rel="stylesheet" type="text/css" />
	<link href="Styles/GridviewCss/gridview.css" rel="stylesheet" type="text/css" />

    <link href="Scripts/jquery.toastmessage.css" rel="stylesheet" type="text/css" />
	<script src="Scripts/jquery.toastmessage.js" type="text/javascript"></script>

	<style type="text/css">
	  .rbtn label {  margin-right:30px; }  
	</style>

	<style type="text/css">
		#div_left
		{
			width: 400px;
			height: 316px;
		}
		.style9
		{
			width: 250px;
		}
	    .mGrid
        {}
	</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="newHolder" runat="server">
    <p class="h1">
		&nbsp;&nbsp;
		Manage Event<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1"
			runat="server">
		</ajaxToolkit:ToolkitScriptManager>
</p>

<div class="divProfile">
			<ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
				Width="836px" Height="1000px" CssClass="MyTabStyle">
				<ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="Update Event">
					<HeaderTemplate>
						Update Event
					
</HeaderTemplate>
					

<ContentTemplate>
<table class="style6">
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateTitle" runat="server" CssClass="lbl_field" Text="Title"></asp:Label>

        </td>
        <td class="style8" colspan="3">
            <asp:TextBox ID="tbxUpdateTitle" runat="server" CssClass="tbx_field"></asp:TextBox>

        </td>
        <td class="style9">
            <asp:RequiredFieldValidator ID="rfvTitleU" runat="server" 
                                        ControlToValidate="tbxUpdateTitle" Display="Dynamic" 
                                        ErrorMessage="Title Required" ValidationGroup="ue"></asp:RequiredFieldValidator>

        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateDesc" runat="server" CssClass="lbl_field" 
										Text="Description"></asp:Label>

        </td>
        <td class="style8" colspan="3">
            <asp:TextBox ID="tbxUpdateDesc" runat="server" CssClass="tbx_field_multi" 
										TextMode="MultiLine"></asp:TextBox>

        </td>
        <td class="style9">
            <asp:RequiredFieldValidator ID="rfvDescU" runat="server" 
                                        ControlToValidate="tbxUpdateDesc" Display="Dynamic" 
                                        ErrorMessage="Description Required" 
                ValidationGroup="ue"></asp:RequiredFieldValidator>

        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateSdate" runat="server" CssClass="lbl_field" 
										Text="Start Date"></asp:Label>

        </td>
        <td class="style8" colspan="3">
            <asp:TextBox ID="tbxUpdateSdate" runat="server" CssClass="tbx_field"></asp:TextBox>

            <ajaxToolkit:CalendarExtender ID="tbxUpdateSdate_CalendarExtender" 
										runat="server" Enabled="True" TargetControlID="tbxUpdateSdate" Format="yyyy/MM/dd"></ajaxToolkit:CalendarExtender>

        </td>
        <td class="style9">
            <asp:RequiredFieldValidator ID="rfvStartDateU" runat="server" 
                                        ControlToValidate="tbxUpdateSdate" Display="Dynamic" 
                                        ErrorMessage="Date Required" ValidationGroup="ue"></asp:RequiredFieldValidator>

                    <asp:RangeValidator ID="rvStartDateU" runat="server" 
                ControlToValidate="tbxUpdateSdate" Display="Dynamic" 
                ErrorMessage="Invalid Date" Type="Date" ValidationGroup="ue"></asp:RangeValidator>

                </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateStime" runat="server" CssClass="lbl_field" 
										Text="Start Time"></asp:Label>

        </td>
        <td class="style21">
            <asp:TextBox ID="tbxUpdateSHour" runat="server" CssClass="tbx_field_time" 
										Height="23px" Width="53px"></asp:TextBox>

            <ajaxToolkit:NumericUpDownExtender ID="tbxUpdateSHour_NumericUpDownExtender" 
										runat="server" Enabled="True" Maximum="12" Minimum="1" RefValues="" 
										ServiceDownMethod="" ServiceDownPath="" ServiceUpMethod="" Tag="" 
										TargetButtonDownID="" TargetButtonUpID="" TargetControlID="tbxUpdateSHour" 
										Width="53"></ajaxToolkit:NumericUpDownExtender>

        </td>
        <td class="style20">
            <asp:TextBox ID="tbxUpdateSMinute" runat="server" CssClass="tbx_field_time" 
										Height="23px" Width="53px"></asp:TextBox>

            <ajaxToolkit:NumericUpDownExtender ID="tbxUpdateSMinute_NumericUpDownExtender" 
										runat="server" Enabled="True" Maximum="59" Minimum="0" 
										RefValues="00;01;02;03;04;05;06;07;08;09;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39;40;41;42;43;44;45;46;47;48;49;50;51;52;53;54;55;56;57;58;59" 
										ServiceDownMethod="" ServiceDownPath="" ServiceUpMethod="" Tag="" 
										TargetButtonDownID="" TargetButtonUpID="" TargetControlID="tbxUpdateSMinute" 
										Width="53"></ajaxToolkit:NumericUpDownExtender>

        </td>
        <td class="style22">
            <asp:TextBox ID="tbxUpdateSAMPM" runat="server" CssClass="tbx_field_time" 
										Height="23px" Width="53px"></asp:TextBox>

            <ajaxToolkit:NumericUpDownExtender ID="tbxUpdateSAMPM_NumericUpDownExtender" 
										runat="server" Enabled="True" RefValues="AM;PM" ServiceDownMethod="" 
										ServiceDownPath="" ServiceUpMethod="" Tag="" TargetButtonDownID="" 
										TargetButtonUpID="" TargetControlID="tbxUpdateSAMPM" Width="53" Maximum="1.7976931348623157E+308" 
                                        Minimum="-1.7976931348623157E+308"></ajaxToolkit:NumericUpDownExtender>

        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateEdate" runat="server" CssClass="lbl_field" 
										Text="End Date"></asp:Label>

        </td>
        <td class="style8" colspan="3">
            <asp:TextBox ID="tbxUpdateEdate" runat="server" CssClass="tbx_field"></asp:TextBox>

            <ajaxToolkit:CalendarExtender ID="tbxUpdateEdate_CalendarExtender" 
										runat="server" Enabled="True" TargetControlID="tbxUpdateEdate" Format="yyyy/MM/dd"></ajaxToolkit:CalendarExtender>

        </td>
        <td class="style9">
		            <asp:RequiredFieldValidator ID="rfvEndDateU" runat="server" 
                ControlToValidate="tbxUpdateEdate" Display="Dynamic" 
                ErrorMessage="Date Required" ValidationGroup="ue"></asp:RequiredFieldValidator>

                    <asp:RangeValidator ID="rvEndDateU" runat="server" 
                ControlToValidate="tbxUpdateEdate" Display="Dynamic" 
                ErrorMessage="Invalid Date" Type="Date" ValidationGroup="ue"></asp:RangeValidator>

                </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateEtime" runat="server" CssClass="lbl_field" 
										Text="End Time"></asp:Label>

        </td>
        <td class="style21">
            <asp:TextBox ID="tbxUpdateHour" runat="server" CssClass="tbx_field_time" 
										Height="23px" Width="53px"></asp:TextBox>

            <ajaxToolkit:NumericUpDownExtender ID="tbxUpdateHour_NumericUpDownExtender" 
										runat="server" Enabled="True" Maximum="12" Minimum="1" RefValues="" 
										ServiceDownMethod="" ServiceDownPath="" ServiceUpMethod="" Tag="" 
										TargetButtonDownID="" TargetButtonUpID="" TargetControlID="tbxUpdateHour" 
										Width="53"></ajaxToolkit:NumericUpDownExtender>

        </td>
        <td class="style20">
            <asp:TextBox ID="tbxUpdateMinute" runat="server" CssClass="tbx_field_time" 
										Height="23px" Width="53px"></asp:TextBox>

            <ajaxToolkit:NumericUpDownExtender ID="tbxUpdateMinute_NumericUpDownExtender" 
										runat="server" Enabled="True" Maximum="59" Minimum="0" 
										RefValues="00;01;02;03;04;05;06;07;08;09;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39;40;41;42;43;44;45;46;47;48;49;50;51;52;53;54;55;56;57;58;59" 
										ServiceDownMethod="" ServiceDownPath="" ServiceUpMethod="" Tag="" 
										TargetButtonDownID="" TargetButtonUpID="" TargetControlID="tbxUpdateMinute" 
										Width="53"></ajaxToolkit:NumericUpDownExtender>

        </td>
        <td class="style22">
            <asp:TextBox ID="tbxUpdateAMPM" runat="server" CssClass="tbx_field_time" 
										Height="23px" Width="53px"></asp:TextBox>

            <ajaxToolkit:NumericUpDownExtender ID="tbxUpdateAMPM_NumericUpDownExtender" 
										runat="server" Enabled="True" RefValues="AM;PM" ServiceDownMethod="" 
										ServiceDownPath="" ServiceUpMethod="" Tag="" TargetButtonDownID="" 
										TargetButtonUpID="" TargetControlID="tbxUpdateAMPM" Width="53" Maximum="1.7976931348623157E+308" 
                                        Minimum="-1.7976931348623157E+308"></ajaxToolkit:NumericUpDownExtender>

        </td>
        <td class="style9">
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateFee" runat="server" CssClass="lbl_field" 
										Text="Admission Fee"></asp:Label>

        </td>
        <td class="style8" colspan="3">
            <asp:TextBox ID="tbxUpdateFee" runat="server" CssClass="tbx_field"></asp:TextBox>

        </td>
        <td class="style9">
		            <asp:RequiredFieldValidator ID="rfvFeeU" runat="server" 
                ControlToValidate="tbxUpdateFee" Display="Dynamic" 
                ErrorMessage="Fee Required. If Free Put 0." ValidationGroup="ue"></asp:RequiredFieldValidator>

                    <asp:RangeValidator ID="rvFeeU" runat="server" 
                ControlToValidate="tbxUpdateFee" Display="Dynamic" 
                ErrorMessage="Invalid Number" MaximumValue="10000000000" MinimumValue="0" 
                Type="Double" ValidationGroup="ue"></asp:RangeValidator>

                </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateLocation" runat="server" CssClass="lbl_field" 
										Text="Location"></asp:Label>

        </td>
        <td class="style8" colspan="3">
            <asp:TextBox ID="tbxUpdateLocation" runat="server" CssClass="tbx_field"></asp:TextBox>

        </td>
        <td class="style9">
		            <asp:RequiredFieldValidator ID="rfvLocationU" runat="server" 
                ControlToValidate="tbxUpdateLocation" ErrorMessage="Location Required" 
                ValidationGroup="ue"></asp:RequiredFieldValidator>

                </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdatePrivacy" runat="server" CssClass="lbl_field" 
										Text="Privacy"></asp:Label>

        </td>
        <td class="style8" colspan="3">
            <asp:RadioButtonList ID="rdblUpdatePrivacy" runat="server" CssClass="rbtn" 
										RepeatColumns="3" RepeatDirection="Horizontal" RepeatLayout="Flow" 
										Width="307px"><asp:ListItem>Public</asp:ListItem>
<asp:ListItem>Private</asp:ListItem>
<asp:ListItem>Secret</asp:ListItem>
</asp:RadioButtonList>

        </td>
        <td class="style9">
		            <asp:RequiredFieldValidator ID="rfvPrivacyU" runat="server" 
                ControlToValidate="rdblUpdatePrivacy" Display="Dynamic" 
                ErrorMessage="Privacy Required" ValidationGroup="ue"></asp:RequiredFieldValidator>

                </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateCategory" runat="server" CssClass="lbl_field" 
										Text="Category"></asp:Label>

        </td>
        <td class="style8" colspan="3">
            <asp:ObjectDataSource ID="ObjectDataSourceUpdateCategory" runat="server" 
										SelectMethod="RetrieveCategory" TypeName="Event_SG_EWDT.DBMANAGER"></asp:ObjectDataSource>

            <asp:DropDownList ID="ddlUpdateCat" runat="server" CssClass="tbx_field" 
										DataSourceID="ObjectDataSourceUpdateCategory" DataTextField="CategoryName" 
										DataValueField="CategoryId">
                <asp:ListItem>Technology</asp:ListItem>
<asp:ListItem>Sports</asp:ListItem>
<asp:ListItem>Pets</asp:ListItem>
</asp:DropDownList>

        </td>
        <td class="style9">
		            <asp:RequiredFieldValidator ID="rfvCategoryU" runat="server" 
                ControlToValidate="ddlUpdateCat" Display="Dynamic" 
                ErrorMessage="Category Required" ValidationGroup="ue"></asp:RequiredFieldValidator>

                </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateThumbnail" runat="server" CssClass="lbl_field" 
										Text="Event Thumbnail"></asp:Label>

        </td>
        <td class="style8" colspan="3">
            <asp:FileUpload ID="fuUpdateThumbnail" runat="server" CssClass="tbx_field" />

        </td>
        <td class="style9">
                    <asp:RegularExpressionValidator ID="U" runat="server" 
                ControlToValidate="fuUpdateThumbnail" Display="Dynamic" 
                ErrorMessage="Invalid Image File Format" 
                ValidationExpression=".+[.](jpg|png|gif|bmp|jpeg|JPG|PNG|GIF|BMP|JPEG)$" 
                ValidationGroup="ue"></asp:RegularExpressionValidator>

                </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdatePoster" runat="server" CssClass="lbl_field" 
										Text="Event Poster"></asp:Label>

        </td>
        <td class="style8" colspan="3">
            <asp:FileUpload ID="fuUpdatePoster" runat="server" CssClass="tbx_field" />

        </td>
        <td class="style9">
                    <asp:RegularExpressionValidator ID="revPosterU" runat="server" 
                ControlToValidate="fuUpdatePoster" Display="Dynamic" 
                ErrorMessage="Invalid Image File Format" 
                ValidationExpression=".+[.](jpg|png|gif|bmp|jpeg|JPG|PNG|GIF|BMP|JPEG)$" 
                ValidationGroup="ue"></asp:RegularExpressionValidator>

                </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            &nbsp;</td>
        <td class="style8" colspan="3">
            <asp:Button ID="btnUpdateEvent" runat="server" CssClass="btnCreateEvent" 
										onclick="btnUpdateEvent_Click" Text="Update!" ValidationGroup="ue" />

        </td>
        <td class="style9">
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            &nbsp;</td>
        <td class="style8" colspan="3">
            &nbsp;</td>
        <td class="style9">
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
</table>
</ContentTemplate>
				

</ajaxToolkit:TabPanel>
				
				<ajaxToolkit:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
					<HeaderTemplate>
						Who's Coming?
					
</HeaderTemplate>
					

<ContentTemplate>
					<div class="Div_myEvent_main">

		<asp:GridView ID="gvWhoIsComingEvents" runat="server"
			AllowPaging="True"
			AutoGenerateColumns="False" 
			 
			CssClass="mGrid"
			PageSize="5"
			HorizontalAlign="Center" 
            DataSourceID="EventParcipantSource"
            onselectedindexchanged="gvWhoIsComingEvents_SelectedIndexChanged">
			
			<AlternatingRowStyle CssClass="alt" />
			
			<Columns>
                <asp:BoundField DataField="membership_no" HeaderText="ID" />
                <asp:BoundField DataField="name" HeaderText="Name" ReadOnly="True" />
                <asp:BoundField DataField="email" HeaderText="Email" ReadOnly="True" />
                <asp:BoundField DataField="member_role" HeaderText="Role" />
                <asp:ButtonField ButtonType="Button" CommandName="Select" 
                    HeaderText="Participation" Text="Reject" />
            </Columns>
			
			<PagerStyle CssClass="pgr" />
		</asp:GridView>


						<asp:ObjectDataSource ID="EventParcipantSource" runat="server" 
							SelectMethod="RetrieveParticipants_Event" TypeName="Event_SG_EWDT.DBQUERIES" 
                            DataObjectTypeName="Event_SG_EWDT.MemberEvent" 
                            UpdateMethod="UpdateMemberEvent_Role">
							<SelectParameters>
								<asp:SessionParameter Name="eventid" SessionField="Event" Type="String" />
							</SelectParameters>
						</asp:ObjectDataSource>


		</div>
					
</ContentTemplate>
				

</ajaxToolkit:TabPanel>
			    <ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
                <HeaderTemplate>
                Pending List
                
</HeaderTemplate>
                

<ContentTemplate>

                    <div class="Div_myEvent_main">
                        <asp:GridView ID="gvPendingEventList" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" CssClass="mGrid" 
                            HorizontalAlign="Center" 
                            PageSize="20" 
                            DataSourceID="EventPendingSource" 
                            onrowcommand="gvPendingEventList_RowCommand">
                            <AlternatingRowStyle CssClass="alt" />
                            <Columns>
                                <asp:BoundField DataField="membership_no" HeaderText="Membership No." />
                                <asp:BoundField DataField="Name" HeaderText="Name" />
                                <asp:BoundField DataField="event_id" HeaderText="Event ID" />
                                <asp:BoundField DataField="event_title" HeaderText="Event Title" />
                                <asp:ButtonField CommandName="Accept" HeaderText="Accept" Text="Accept" />
                                <asp:ButtonField CommandName="Reject" HeaderText="Reject" Text="Reject" />
                            </Columns>
                            <PagerStyle CssClass="pgr" />
                        </asp:GridView>
                        
                     
                        <asp:ObjectDataSource ID="EventPendingSource" runat="server" 
                            DataObjectTypeName="Event_SG_EWDT.MemberEvent" 
                            SelectMethod="RetrieveEventPendingList" TypeName="Event_SG_EWDT.DBQUERIES">
                            <SelectParameters>
                                <asp:SessionParameter Name="event_id" SessionField="Event" Type="Int32" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                        
                     
                    </div>

                
</ContentTemplate>
                

</ajaxToolkit:TabPanel>
			</ajaxToolkit:TabContainer>
	</div>

<!--original-->
	<div class="div_main">
		<br />
	</div>
	<br />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderUser" runat="server">
</asp:Content>
